import { IsString, IsJSON, IsEnum, IsPhoneNumber, IsArray, Min, Length, IsOptional, IsBoolean,IsNumber, IsNumberString, IsEmail, IsDateString } from 'class-validator';
import { ApiProperty, PartialType } from '@nestjs/swagger';
import { PagingDto } from 'src/common/dto/index';

export enum TypeEnum {
    Tangshi = '0',
    Songci = '1',
    Yuanqu = '2',
    Mingshi = '3',
    Qingshi = '4',
    Songshi = '5',
    Wudai = '6',
    Sishuwujin = '7',
    Qita = '8',
    Weijin = '9'
}

export class CreatePoetryDto {
    @ApiProperty({ required: true })
    @Length(0,255)
    poetry_id: string; 

    @ApiProperty({ required: true })
    @Length(0,255)
    title: string;

    @ApiProperty({ required: true })
    @Length(0,255)
    @IsEnum(TypeEnum)
    type: string;

    @ApiProperty({ required: true })
    @Length(0,255)
    type_name: string;

    @ApiProperty({ required: true })
    @Length(0,255)
    author: string;

    @ApiProperty({ required: true })
    tags:string;


    @ApiProperty({ required: true })
    paragraphs:string;

    @ApiProperty({ required: false })
    rhythmic:string;

    @ApiProperty({ required: false })
    biography:string;

    @ApiProperty({ required: false })
    prologue:string;

    @ApiProperty({ required: false })
    notes:string;




}